/*
* $Id: DateDraw.h 86 2010-05-12 17:32:35Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _DATE_DRAW_H_
#define _DATE_DRAW_H_

#include "DrawControl.h"
#include "DayDraw.h"

class CEditorItem;

class CDateDraw : public CDrawControl
{
private:
	int m_nMonth;
	int m_nYear;
	int m_nDay;
	int m_nWDay;
	CEditorItem* m_pParent;
	std::vector<CDayDraw> m_aDays;
private:
	void Init();
	void PaintArrow(CDC* dc, CPoint topleft, CSize sizearrow, bool bLeft);
protected:
	virtual void Resize();
	virtual void PaintActive(CDC* dc);
	virtual void PaintNonActive(CDC* dc);
public:
	CDateDraw(const std::tstring& strName, CEditorItem* pParent);
	virtual ~CDateDraw();
public:
	virtual void SetPos(CPoint pos);
	virtual std::tstring GetValue();
	virtual bool ProcessMouse(unsigned int nChar, CPoint pos, int param);
public:
	void SetDay(int nDay);
	void OffsetDay(int offset);
};

#endif/*_DATE_DRAW_H_*/